package com.atguigu.jxc.service.impl;

import com.atguigu.jxc.dao.PurchaseListDao;
import com.atguigu.jxc.entity.PurchaseList;
import com.atguigu.jxc.service.PurchaseListService;
import com.atguigu.jxc.util.ResultUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class PurchaseListServiceImpl extends ServiceImpl<PurchaseListDao, PurchaseList> implements PurchaseListService {

    @Autowired
    private PurchaseListDao purchaseListDao;

    @Override
    public Map<String, Object> getPurchaseListGoodsList(String purchaseNumber, Integer supplierId, Integer state, String sTime, String eTime) {
       List<PurchaseList> purchaseListList = purchaseListDao.selectListOFPurchaseListGoods(purchaseNumber,supplierId,state,sTime,eTime);

        Map<String, Object> map = ResultUtil.toRowsMap(purchaseListList);
        return map;
    }
}
